Skip to content

server: fix network upgrade for IPv6#6729

Merged
shwstppr merged 1 commit intoapache:4.17from
shapeblue:fix-nw-ipv6-upgrade
Sep 13, 2022
Merged

server: fix network upgrade for IPv6#6729
shwstppr merged 1 commit intoapache:4.17from
shapeblue:fix-nw-ipv6-upgrade

Conversation

@shwstppr
Copy link
Copy Markdown
Contributor

@shwstppr shwstppr commented Sep 12, 2022

Description

Fixes network update for IPv6 offering upgrade

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Before fix:

# cat /marvin//MarvinLogs/test_network_ipv6_W9ENW4/results.txt 
Test to verify IPv6 network ... === TestName: test_01_verify_ipv6_network | Status : SUCCESS ===
ok
Test to verify redundant IPv6 network ... === TestName: test_02_verify_ipv6_network_redundant | Status : SUCCESS ===
ok
Test to verify IPv4 network upgraded to IPv6 network ... === TestName: test_03_verify_upgraded_ipv6_network | Status : EXCEPTION ===
ERROR
Test to verify redundant IPv4 network upgraded to redundant IPv6 network ... === TestName: test_04_verify_upgraded_ipv6_network_redundant | Status : EXCEPTION ===
ERROR

# cat /marvin//MarvinLogs/test_network_ipv6_W9ENW4/failed_plus_exceptions.txt 
2022-09-12 09:02:13,776 - CRITICAL - EXCEPTION: test_03_verify_upgraded_ipv6_network: ['Traceback (most recent call last):\n', '  File "/usr/lib64/python3.6/unittest/case.py", line 60, in testPartExecutor\n    yield\n', '  File "/usr/lib64/python3.6/unittest/case.py", line 622, in run\n    testMethod()\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/lib/decoratorGenerators.py", line 30, in test_wrapper\n    return test(self, *args, **kwargs)\n', '  File "/marvin/tests/component/test_network_ipv6.py", line 888, in test_03_verify_upgraded_ipv6_network\n    self.updateNetworkWithOffering()\n', '  File "/marvin/tests/component/test_network_ipv6.py", line 548, in updateNetworkWithOffering\n    self.network.update(self.userapiclient, networkofferingid=self.network_offering_update.id)\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/lib/base.py", line 3275, in update\n    return (apiclient.updateNetwork(cmd))\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py", line 2187, in updateNetwork\n    response = self.connection.marvinRequest(command, response_type=response, method=method)\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 381, in marvinRequest\n    raise e\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 376, in marvinRequest\n    raise self.__lastError\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 105, in __poll\n    % async_response)\n', 'Exception: Job failed: {accountid : \'2668148f-79d0-465b-924f-6c8d136315cb\', userid : \'48c0288b-bfc8-4b0f-8ea9-471f598ec4fd\', cmd : \'org.apache.cloudstack.api.command.user.network.UpdateNetworkCmd\', jobstatus : 2, jobprocstatus : 0, jobresultcode : 530, jobresulttype : \'object\', jobresult : {errorcode : 530, errortext : "Failed to upgrade network offering to \'Test Network offering-NF816G\' as unable to allocate IPv6 network"}, jobinstancetype : \'Network\', created : \'2022-09-12T09:01:14+0000\', completed : \'2022-09-12T09:01:14+0000\', jobid : \'915100ce-d7f9-4455-9725-f52ac6dfd3f3\'}\n']
2022-09-12 09:05:45,283 - CRITICAL - EXCEPTION: test_04_verify_upgraded_ipv6_network_redundant: ['Traceback (most recent call last):\n', '  File "/usr/lib64/python3.6/unittest/case.py", line 60, in testPartExecutor\n    yield\n', '  File "/usr/lib64/python3.6/unittest/case.py", line 622, in run\n    testMethod()\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/lib/decoratorGenerators.py", line 30, in test_wrapper\n    return test(self, *args, **kwargs)\n', '  File "/marvin/tests/component/test_network_ipv6.py", line 928, in test_04_verify_upgraded_ipv6_network_redundant\n    self.updateNetworkWithOffering()\n', '  File "/marvin/tests/component/test_network_ipv6.py", line 548, in updateNetworkWithOffering\n    self.network.update(self.userapiclient, networkofferingid=self.network_offering_update.id)\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/lib/base.py", line 3275, in update\n    return (apiclient.updateNetwork(cmd))\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py", line 2187, in updateNetwork\n    response = self.connection.marvinRequest(command, response_type=response, method=method)\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 381, in marvinRequest\n    raise e\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 376, in marvinRequest\n    raise self.__lastError\n', '  File "/usr/local/lib/python3.6/site-packages/marvin/cloudstackConnection.py", line 105, in __poll\n    % async_response)\n', 'Exception: Job failed: {accountid : \'2668148f-79d0-465b-924f-6c8d136315cb\', userid : \'48c0288b-bfc8-4b0f-8ea9-471f598ec4fd\', cmd : \'org.apache.cloudstack.api.command.user.network.UpdateNetworkCmd\', jobstatus : 2, jobprocstatus : 0, jobresultcode : 530, jobresulttype : \'object\', jobresult : {errorcode : 530, errortext : "Failed to upgrade network offering to \'Network off-RVR services-0HRGO3\' as unable to allocate IPv6 network"}, jobinstancetype : \'Network\', created : \'2022-09-12T09:04:38+0000\', completed : \'2022-09-12T09:04:38+0000\', jobid : \'3a37d6d5-b841-493d-97dd-105316ea7787\'}\n']

After fix:

# cat /marvin//MarvinLogs/test_network_ipv6_ZJBQRM/results.txt 
Test to verify IPv6 network ... === TestName: test_01_verify_ipv6_network | Status : SUCCESS ===
ok
Test to verify redundant IPv6 network ... === TestName: test_02_verify_ipv6_network_redundant | Status : SUCCESS ===
ok
Test to verify IPv4 network upgraded to IPv6 network ... === TestName: test_03_verify_upgraded_ipv6_network | Status : SUCCESS ===
ok
Test to verify redundant IPv4 network upgraded to redundant IPv6 network ... === TestName: test_04_verify_upgraded_ipv6_network_redundant | Status : SUCCESS ===
ok

----------------------------------------------------------------------
Ran 4 tests in 2096.898s

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@shwstppr a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@shwstppr shwstppr added this to the 4.17.1.0 milestone Sep 12, 2022
@shwstppr shwstppr marked this pull request as ready for review September 12, 2022 09:51
@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4170

@shwstppr
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@shwstppr a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Copy Markdown
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 12, 2022

Codecov Report

Merging #6729 (e4cfdbc) into 4.17 (d3bfdac) will increase coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##               4.17    #6729   +/-   ##
=========================================
  Coverage      5.88%    5.88%           
- Complexity     3927     3928    +1     
=========================================
  Files          2451     2451           
  Lines        242338   242338           
  Branches      37923    37923           
=========================================
+ Hits          14261    14263    +2     
+ Misses       226502   226498    -4     
- Partials       1575     1577    +2     
Impacted Files Coverage Δ
...c/main/java/com/cloud/network/Ipv6ServiceImpl.java 0.00% <0.00%> (ø)
...om/cloud/hypervisor/kvm/resource/LibvirtVMDef.java 62.30% <0.00%> (ø)
...apache/cloudstack/alert/snmp/SnmpTrapAppender.java 61.05% <0.00%> (+2.10%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-4871)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 38742 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6729-t4871-kvm-centos7.zip
Smoke tests completed. 96 look OK, 5 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_list_snapshots_with_removed_data_store Error 9.65 test_snapshots.py
test_02_list_snapshots_with_removed_data_store Error 9.65 test_snapshots.py
test_01_add_primary_storage_disabled_host Error 0.57 test_primary_storage.py
test_01_primary_storage_nfs Error 0.11 test_primary_storage.py
ContextSuite context=TestStorageTags>:setup Error 0.20 test_primary_storage.py
test_03_deploy_and_scale_kubernetes_cluster Failure 32.99 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 64.02 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 41.14 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 48.59 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 137.57 test_kubernetes_clusters.py
test_01_secure_vm_migration Error 156.62 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 272.33 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 141.19 test_vm_life_cycle.py
test_08_migrate_vm Error 42.70 test_vm_life_cycle.py
test_hostha_enable_ha_when_host_in_maintenance Error 304.81 test_hostha_kvm.py

@yadvr
Copy link
Copy Markdown
Member

yadvr commented Sep 13, 2022

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

@rohityadavcloud a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@shwstppr
Copy link
Copy Markdown
Contributor Author

Manually tested failed smoke tests. Failures were intermittent, env related.
6729.log
Merging this and will keep an eye on health check PR

@shwstppr shwstppr merged commit e8b249f into apache:4.17 Sep 13, 2022
@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-4877)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41926 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6729-t4877-kvm-centos7.zip
Smoke tests completed. 100 look OK, 1 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_08_upgrade_kubernetes_ha_cluster Failure 551.80 test_kubernetes_clusters.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants